package com.sn.pw.dao.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 人员信息
 * </p>
 *
 * @author mx
 * @since 2023-12-06
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("user")
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

    /**
     * 人员ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 人员姓名
     */
    @TableField("person_name")
    private String personName;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 手机号
     */
    @TableField("phone")
    private String phone;

    /**
     * 密码
     */
    @TableField("password")
    private String password;

    /**
     * 类型
     */
    @TableField("type")
    private Integer type;

    /**
     * 物流公司ID
     */
    @TableField("company_id")
    private Long companyId;

    /**
     * openId
     */
    @TableField("openid")
    private Integer openid;

    /**
     * 是否是超级管理员
     */
    @TableField("super_admin")
    private Integer superAdmin;

    /**
     * token
     */
    @TableField("token")
    private Integer token;

    /**
     * 逻辑删除字段 0未删除 1删除
     */
    @TableField("is_delete")
    private Integer isDelete;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 创建者
     */
    @TableField("creator")
    private String creator;

    /**
     * 更新者
     */
    @TableField("updater")
    private String updater;

    @TableField("is_show")
    private Boolean is_show;

    public static final String USER_ID = "user_id";

    public static final String PERSON_NAME = "person_name";

    public static final String ID = "id";

    public static final String PHONE = "phone";

    public static final String PASSWORD = "password";

    public static final String TYPE = "type";

    public static final String COMPANY_ID = "company_id";

    public static final String OPENID = "openid";

    public static final String SUPER_ADMIN = "super_admin";

    public static final String TOKEN = "token";

    public static final String IS_DELETE = "is_delete";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String CREATOR = "creator";

    public static final String UPDATER = "updater";
    public static final String IS_SHOW = "is_show";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
